package com.wmtiger.component
{
	public class WMLabelButton extends WMButton
	{
		private var _label:String = "";
		private var _wmLabel:WMLabel;
		
		public function WMLabelButton(label:String = "")
		{
			_label = label;
			super();
			initView();
		}
		
		protected override function initView():void
		{
			super.initView();
			
			_wmLabel = new WMLabel(_label);
			addChild(_wmLabel);
		}
		
		public function set label(label:String):void
		{
			_label = label;
			_wmLabel.label = _label;
		}
		
		public function get label():String
		{
			return _label;
		}
		
		public override function dispose():void
		{
			if (_wmLabel)
			{
				_wmLabel.dispose();
			}
			_wmLabel = null;
		}
	}
}